import { EntityDto } from "./entity";
import type { IAudited } from "./interfaces/audited";
import type { MenuButtonResultDto } from "./menu-button";
import { PagedResultRequestDto } from "./paged-result-request";

export class MenuDto extends EntityDto {
    public code!: string;

    public displayName!: string;

    public parentCode?: string;

    public link?: string;

    public sort: number = 1;

    public icon?: string;

    public isActive: boolean = true;

    public description?: string;
}

export class MenuResultDto extends MenuDto implements IAudited {
    public type: number = 1;

    public creatorUserId?: number;

    public creationTime!: Date;

    public lastModifierUserId?: number;

    public lastModificationTime?: Date;

    public childrens?: Array<MenuResultDto>;

    public baseMenuButton?: Array<MenuButtonResultDto>;
}

export class MenuResultRequestDto extends PagedResultRequestDto {
    public code?: string;

    public isActive?: boolean;
}